package com.wuseguang.springcloud.controller;


import com.wuseguang.springcloud.Filter.RequestParameterWrapper;
import com.wuseguang.springcloud.service.SaveAttendService;
import com.wuseguang.springcloud.util.Result;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @描述 保存考勤
 * @创建人 zm
 * @创建时间 2020/7/8
 */
@RestController
@RequestMapping("/quartz")
public class SaveAttendController {

    private Logger logger = LoggerFactory.getLogger(this.getClass());

    @Autowired
    private SaveAttendService attendService;


    @RequestMapping("/saveAttend")
    public Result saveAttend(RequestParameterWrapper request) {
        logger.info("保存考勤");
        String schoolId = request.getParam("schoolId");
        return attendService.saveAttend(schoolId);
    }
}
